package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by zhangjh on 2016/10/14.
 */
@Entity
@Table(name = "banner")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class Banner extends IDEntityMall {
    @Column(columnDefinition = "bigint(20) comment '平台ID'")
    private Long mallId;
    @Column(columnDefinition = "varchar(255) comment '图片路径'")
    private String picPath;
    @Column(columnDefinition = "int(20) comment '序号(排序字段)'")
    private Integer seqNo;
    @Column(columnDefinition = "varchar(255) comment '标题'")
    private String title;
    @Column(columnDefinition = "varchar(255) comment '页面链接'")
    private String url;
    public final static String UP = "UP";
    public final static  String DOWN = "DOWN";
    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public String getPicPath() {
        return picPath;
    }

    public void setPicPath(String picPath) {
        this.picPath = picPath;
    }

    public Integer getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(Integer seqNo) {
        this.seqNo = seqNo;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        return "Banner{" +
                "mallId=" + mallId +
                ", picPath='" + picPath + '\'' +
                ", seqNo=" + seqNo +
                ", title='" + title + '\'' +
                ", url='" + url + '\'' +
                '}';
    }
}
